package ysq.xyg.base.extend.activemq.controller;

import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import ysq.xyg.base.extend.activemq.service.ProducerService;

import javax.annotation.Resource;
import javax.jms.Destination;

/**
 * @author shengQiang yu
 * @date 2019-05-24 11:32
 */
@RestController
public class ActiveMqController {

    @Resource
    private ProducerService producerService;

    @Resource
    @Qualifier("queueDestination")
    private Destination queueDestination;

    @RequestMapping("/activeMq/sendMsg")
    public void sendMsg(String msg){
        producerService.sendMsg(queueDestination,msg);
    }

}
